import request from '@/utils/request'

export function getDictTemplate(dictId) {
  return request({
    url: `/yxdd/dictTemplate/findBy/${dictId}`,
    method: 'post'
  })
}

export function getDictTree(dictId) {
  return request({
    url: `/yxdd/dict/tree`,
    method: 'post'
  })
}

export function getDictDataList(params) {
  return request({
    url: `/yxdd/dictData/list`,
    method: 'post',
    data:params
  })
}

export function getDictDataSaveOrUpdate(dictObj) {
  return request({
    url: `/yxdd/dictData/save`,
    method: 'post',
    data: dictObj
  })
}

export function remove(dictDataDistributedId) {
  return request({
    url: `/yxdd/dictData/delete/${dictDataDistributedId}`,
    method: 'post'
  })
}

/**
 * 获取船闸所闸室列表
 * @param query
 * @returns {*}
 */
export function czzsList(param) {
  return request({
    url: '/yxdd/czzs/list',
    method: 'post',
    data: param
  })
}

/**
 * 轨迹校验管理
 * parmas :{
 *   czsId,
 *   sxy
 * }
 * */
export function getCzsDxGjjy(params){
  return request({
    url: '/yxdd/gjjy/list',
    method:'post',
    data: params
  })
}

/**
 * 保存
 * {
	"dqjgid": 0,-----
	"dqjgmc": "",

	"gjjyid": 0,

	"jyjgid": 0,--------
	"jyjgmc": "",

	"sx": true,---------
	"sxy": 0,----------
	"xx": true--------
	-
	}
 * */
export function saveGuiJiCheckSettings(params){
  return request({
    url: '/yxdd/gjjy/save',
    method:'post',
    data: params
  })
}

// 获取费率列表
export function getFlList(params){
  return request({
    url: '/yxdd/flsz/list',
    method:'post',
    data: params
  })
}

// 费率修改保存
export function saveFlList(params){
  return request({
    url: '/yxdd/flsz/save',
    method:'post',
    data: params
  })
}
